package models;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class User{
 
	@Id
	public String email;
	public String name;
	public String password;

	public User(String email, String name, String password) {
		this.email = email;
		this.name = name;
		this.password = password;
	}
	
	public static User authenticate(String email, String password) {
		if ("test@test".equals(email) && "1234".equals(password)){
			return new User("test@test", "test", "1234");
		}
		return null;
	}	
}
